<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MAVLink Generator (C/C++, Python) - QGroundControl GCS</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="date" content="2013-09-25T22:51:40+0200"/>
<meta name="keywords" content="mavlink,generator"/>
<link rel="search" type="application/opensearchdescription+xml" href="/lib/exe/opensearch.php" title="QGroundControl GCS"/>
<link rel="start" href="/"/>
<link rel="contents" href="/mavlink/generator?do=index" title="Sitemap"/>
<link rel="alternate" type="application/rss+xml" title="Recent Changes" href="/feed.php"/>
<link rel="alternate" type="application/rss+xml" title="Current Namespace" href="/feed.php?mode=list&amp;ns=mavlink"/>
<link rel="alternate" type="text/html" title="Plain HTML" href="/_export/xhtml/mavlink/generator"/>
<link rel="alternate" type="text/plain" title="Wiki Markup" href="/_export/raw/mavlink/generator"/>
<link rel="canonical" href="http://qgroundcontrol.org/mavlink/generator"/>
<link rel="stylesheet" type="text/css" href="/lib/exe/css.php?t=mnml-blog&amp;tseed=1378908877"/>
<script type="text/javascript">/*<![CDATA[*/var NS='mavlink';var JSINFO = {"id":"mavlink:generator","namespace":"mavlink"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="/lib/exe/js.php?tseed=1378908877"></script>

<link rel="shortcut icon" href="/lib/tpl/mnml-blog/images/favicon.ico" />
<script type="text/javascript" charset="utf-8" src="/lib/tpl/mnml-blog/user/user.js"></script>
<!--[if lt IE 7]><style type="text/css">img { behavior: url(/lib/tpl/mnml-blog/js/iepngfix/iepngfix.htc); }</style><![endif]-->
</head>

<body>
<div id="pagewrap">

    <!-- start header -->
    <div id="tmpl_header">
        <a href="/" name="dokuwiki__top" id="dokuwiki__top" accesskey="h"><img src="/lib/tpl/mnml-blog/user/logo.png" id="tmpl_header_logo_img" alt=""/></a>

       <div id="tmpl_header_nav">
<ul>
<li class="level1"><div class="li"> <a href="/start" class="wikilink1" title="start">Home</a></div>
</li>
<li class="level1"><div class="li"> <a href="/videos" class="wikilink1" title="videos">Videos</a></div>
</li>
<li class="level1"><div class="li"> <a href="/users/start" class="wikilink1" title="users:start">User&#039;s Guide</a></div>
</li>
<li class="level1"><div class="li"> <a href="/dev/start" class="wikilink1" title="dev:start">Developer&#039;s Guide</a></div>
</li>
<li class="level1"><div class="li"> <a href="/mavlink/start" class="wikilink1" title="mavlink:start">MAVLink</a></div>
</li>
<li class="level1"><div class="li"> <a href="/downloads" class="wikilink1" title="downloads">Downloads</a></div>
</li>
</ul>
            <div class="clearer"></div>
        </div>
        <div class="clearer"></div>
    </div>
    <!-- end header -->


    <!-- start main content area -->
    <div class="dokuwiki">
        
        <!-- start left col -->
        <div id="content">
            <div class="page">
                
<!-- start rendered page content -->

<h1 class="sectionedit1" id="mavlink_generator_cc_python">MAVLink Generator (C/C++, Python)</h1>
<div class="level1">

<p>
MAVLink is distributed with a common set of messages. Custom messages can be generated and included as a replacement for the common message set or as extension to it. See the minimal.xml for a minimal example and pixhawk.xml for an example of using the common message set with some project-specific extensions.
</p>

<p>
Download the generator from here: <a href="https://github.com/mavlink/mavlink" class="urlextern" title="https://github.com/mavlink/mavlink"  rel="nofollow">https://github.com/mavlink/mavlink</a>
</p>

<p>
Then run:
</p>
<pre class="code"> python mavgenerate.py
 </pre>

<p>
To obtain the generator <abbr title="Graphical User Interface">GUI</abbr>.
</p>

</div>

<h4 id="generator_steps">Generator Steps</h4>
<div class="level4">
<ol>
<li class="level1"><div class="li"> Load XML file, from mavlink/message_definitions</div>
</li>
<li class="level1"><div class="li"> Select output directory, e.g. mavlink/include</div>
</li>
<li class="level1"><div class="li"> Click “Generate”</div>
</li>
<li class="level1"><div class="li"> Use the new headers in your project</div>
</li>
</ol>

</div>

<!-- end rendered page content -->
<div class="clearer"></div>


            </div>
        </div>
        <!-- end left col -->
        
        <!-- start right col -->
        <div id="tmpl_sidebar">
            
            <div class="sidebarnav">

<h1 class="sectionedit1" id="overview">Overview</h1>
<div class="level1">
<ul>
<li class="level1"><div class="li"> <a href="/start" class="wikilink1" title="start">Home</a></div>
</li>
<li class="level1"><div class="li"> <a href="/videos" class="wikilink1" title="videos">Videos</a></div>
</li>
<li class="level1"><div class="li"> <a href="/screenshots" class="wikilink1" title="screenshots">Screenshots</a></div>
</li>
<li class="level1"><div class="li"> <a href="/bugreporting" class="wikilink1" title="bugreporting">Bug Reporting</a></div>
</li>
<li class="level1"><div class="li"> <a href="/downloads" class="wikilink1" title="downloads">Downloads</a></div>
</li>
</ul>

</div>
<!-- EDIT1 SECTION "Overview" [1-136] -->
<h1 class="sectionedit2" id="mavlink">MAVLink</h1>
<div class="level1">
<ul>
<li class="level1"><div class="li"> <a href="/mavlink/start" class="wikilink1" title="mavlink:start">MAVLink Overview</a></div>
</li>
<li class="level1"><div class="li"> <a href="/mavlink/waypoint_protocol" class="wikilink1" title="mavlink:waypoint_protocol">Waypoint Protocol</a></div>
</li>
<li class="level1"><div class="li"> <a href="/mavlink/parameter_protocol" class="wikilink1" title="mavlink:parameter_protocol">Parameter Protocol</a></div>
</li>
<li class="level1"><div class="li"> <a href="/dev/mavlink_onboard_integration_tutorial" class="wikilink1" title="dev:mavlink_onboard_integration_tutorial">Onboard Integration</a></div>
</li>
<li class="level1"><div class="li"> <span class="curid"><a href="/dev/mavlink_linux_integration_tutorial" class="wikilink1" title="dev:mavlink_linux_integration_tutorial">Linux Integration</a></span></div>
</li>
</ul>

</div>
<!-- EDIT2 SECTION "MAVLink" [137-400] -->
<h1 class="sectionedit3" id="users">Users</h1>
<div class="level1">
<ul>
<li class="level1"><div class="li"> <a href="/users/start" class="wikilink1" title="users:start">User&#039;s Guide</a></div>
</li>
<li class="level1"><div class="li"> <a href="/about" class="wikilink1" title="about">About</a></div>
</li>
<li class="level1"><div class="li"> <a href="/credits" class="wikilink1" title="credits">Credits / Contact</a></div>
</li>
<li class="level1"><div class="li"> <a href="/license" class="wikilink1" title="license">License</a></div>
</li>
</ul>

</div>
<!-- EDIT3 SECTION "Users" [401-491] -->
<h1 class="sectionedit4" id="developers">Developers</h1>
<div class="level1">
<ul>
<li class="level1"><div class="li"> <a href="/dev/start" class="wikilink1" title="dev:start">Developer&#039;s Guide</a></div>
</li>
<li class="level1"><div class="li"> <a href="/dev/roadmap" class="wikilink1" title="dev:roadmap">Roadmap</a></div>
</li>
<li class="level1"><div class="li"> <a href="/dev/deployment" class="wikilink1" title="dev:deployment">Deployment</a></div>
</li>
<li class="level1"><div class="li"> <a href="/mavlink/start" class="wikilink1" title="mavlink:start">MAVLink</a></div>
</li>
<li class="level1"><div class="li"> <a href="/dev/coding_guidelines" class="wikilink1" title="dev:coding_guidelines">Coding Guidelines</a></div>
</li>
</ul>

</div>
<!-- EDIT4 SECTION "Developers" [492-] -->            </div>


            
            <div id="search" class="sidebarbox">
                <h5 class="hspec">Search</h5>
                <div class="level1"><form action="/start" accept-charset="utf-8" class="search" id="dw__search" method="get"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" class="edit" title="[F]" /><input type="submit" value="Search" class="button" title="Search" /><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
                </div>
            </div>

            
            <div id="licenseinfo">
                <div class="license">Except where otherwise noted, content on this wiki is licensed under the following license: <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license" class="urlextern">CC Attribution-Share Alike 3.0 Unported</a></div>
            </div>


            <div class="clearer"></div>
        </div>
        <!-- end right col -->
        <div class="clearer"></div>

        <div id="tmpl_footer">
            <div id="tmpl_footer_actlinksleft">
                [&#160;<a href="#dokuwiki__top"  class="action top" accesskey="t" rel="nofollow" title="Back to top [T]">Back to top</a>&#160;|&#160;<a href="/mavlink/generator?do=index"  class="action index" accesskey="x" rel="nofollow" title="Sitemap [X]">Sitemap</a>&#160;]
            </div>
            <div id="tmpl_footer_actlinksright">
                [&#160;<a href="/mavlink/generator?do=login&amp;sectok=ced0a41ffcda1565d306325d6f4db601"  class="action login" rel="nofollow" title="Login">Login</a>&#160;|&#160;<a href="/wiki/create_new_blogpost?do=login" rel="nofollow">New Post</a>&#160;]            </div>
            <div class="clearer"></div>
            <div id="tmpl_footer_metainfo">
                <a href="http://andreas-haerter.com/projects/dokuwiki-template-mnml-blog">mnml-blog</a> on <a href="http://www.dokuwiki.org/">DW</a> under the hood
            </div>
        </div>

    </div>
    <!-- end main content area -->
    <div class="clearer"></div>
    <img src="/lib/exe/indexer.php?id=mavlink%3Agenerator&amp;1431057180" width="2" height="1" alt="" />
</div>
</body>
</html>
